home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / System / ps2m / ps2m_manual < prev    next >
Encoding:
Text File  |  2001-04-07  |  9.9 KB  |  288 lines

  1.  
  2. Amiga PS/2 Wheel Mouse Controller v1.2
  3.  
  4.  
  5. Advantages of this controller:
  6.  
  7. - full open source under GPL
  8.   (General Public License, text of license included)
  9. - linear movement interpolation: mouse movements will be
  10.   ideal smooth on any screen frame rates
  11. - MMB (Middle Mouse Button) support
  12. - detection of Amiga mouse counters overrun
  13.   (127 pixels per frame for DblPAL 48Hz)
  14. - full Plug'n'Play support:
  15.   hotswap - you can change mouse «on the fly»
  16. - mouse hangs detection: controller checks mouse every
  17.   2 seconds and will reset it if mouse doesn't reply
  18. - support of popular Microsoft Intellimouse wheel protocol
  19.   (for example, Genius NetScroll)
  20. - fully compatible with Amiga NewMouse wheel standard
  21. - fully compatible with WheelBusMouse software
  22. - you can simultaneously use mouse & 2 joysticks
  23. - no «calibration» requirements
  24. - wheel works in any screen mode
  25. - horizontal scrolling even on one-wheel mouse
  26. - most advanced Amiga PS/2 mouse controller :-)
  27.  
  28.  
  29. More detailed info:
  30.  
  31. - detection of Amiga mouse counters overrun:
  32.  
  33.   Amiga has only one-byte signed counters for mouse, and AmigaOS
  34.   checks them only one time per vblank.  This means that mouse may
  35.   move only 127*VBlankFreq pixels per second (6096 pixels per
  36.   second for default DblPAL).  If this value was overran, AmigaOS
  37.   can't detect true movement of mouse and pointer will disorderly
  38.   jump.  For correct this, my PS/2 controller limits movement to
  39.   maximum 6000 pixels per second.  If mouse moves faster, movement
  40.   will be remembered and executed at 6000 pixels per second.
  41.  
  42.   Slower movements will be always executed at real speed.
  43.  
  44. - linear movement interpolation:
  45.  
  46.   As we know, RS-232C (aka «COM») mice at PeeCee are extremely
  47.   poor quality - mouse pointer with them doesn't move, it jumps.
  48.   It is because generic 3-button RS-232C mouse reports about
  49.   movement only 25 times per second.  PS/2 mice work better - all
  50.   of them can report about state 80 times per second, and most of
  51.   them (excluding 5-button mice) can report 200 times per second.
  52.   But it is not an ideal because refresh rate of mouse (for
  53.   example, 80fps of Genius NetScroll Optical) interferes with
  54.   similar refresh rate (for example, 72Hz of Super72).  For correct
  55.   this, my controller moves «virtual Amiga mouse» smoothly.  If
  56.   user moves PS/2 mouse at 500 pixels per second, Amiga will get
  57.   from my PS/2 controller true 500 counts per second, with true
  58.   2-milliseconds intervals - you can get oscilliscope and check it.
  59.  
  60.   Most another PeeCee-mouse-controllers don't have similar feature,
  61.   and move «virtual Amiga mouse» by «count packets» after every
  62.   byte packet from PeeCee-mouse.  For example, if user moves 
  63.   RS-232C mouse at 500 pixels per second, and mouse sends 25
  64.   reports per second, Amiga will get 25 packets of 20 fast (some
  65.   microsecond between counts) counts per second, with approx.40
  66.   milliseconds interval between packets.  If user has 75Hz screen
  67.   refresh rate, mouse pointer will update only every three vblank,
  68.   and jumps of pointer (in comparison with ideally smooth Amiga
  69.   mouse) will only incline user to suicide using mouse cord :-)
  70.  
  71.   My PS/2 controller is free from this bug.  Theoretically I can do
  72.   even smooth RS-232C mouse controller, but is it nonsense because
  73.   of RS-232C mice death.  Modern optical mice already don't have
  74.   RS-232C versions, but there is no modern mice without PS/2 version.
  75.  
  76. - mouse hangs detection:
  77.  
  78.   Some Chinese mice are very cheap and very unstable.  Integrated
  79.   to mouse controller can hang and even don't response to reset
  80.   command.  These mice on PeeCee require reconnect (and sometimes
  81.   reboot because of not-PnP initial nature of PeeCee).  My
  82.   controller in case of 2-seconds silence (user doesn't touch
  83.   mouse) asks mouse about state.  If mouse doesn't respond,
  84.   controller will automatically take away power souce for some
  85.   time.
  86.  
  87. - full Plug'n'Play support:
  88.  
  89.   Because of previous feature, controller will detect mouse
  90.   replacement.  Unlike PeeCee, wheel function (or it's absence)
  91.   will be detected automatically.  You don't need to replace
  92.   drivers if you change mouse «on the fly» :)
  93.  
  94. - support of popular Microsoft Intellimouse wheel protocol
  95.  
  96.   Microsoft (for this paragraph it is a company name, not an abuse)
  97.   instead of it's normal practice to hide all details, published
  98.   protocol of wheel mouse.  It has two «layers»: protocol of wheel
  99.   mouse, and protocol of 5-button wheel mouse.  There are many
  100.   Microsoft Intellimouse compatible devices (for example, Genius
  101.   NetScroll Optical), and all of them will work with wheel at my
  102.   controller.  Unfortunately, protocol of my Genius mouse differs
  103.   from Microsoft 5-button protocol, and I don't support 5 buttons
  104.   yet.
  105.  
  106.   I don't have info about Intellimouse compatibility of other
  107.   devices.  Don't ask me.
  108.  
  109. - fully compatible with Amiga NewMouse wheel standard
  110.  
  111.   Amiga NewMouse standard describes an internal AmigaOS protocol
  112.   for wheel mice.  There are some NewMouse-compatible sofware,
  113.   MUIWheel and Directory Opus Magellan for example.  All this
  114.   software will work with my PS/2 controller.
  115.  
  116. - fully compatible with WheelBusMouse software
  117.  
  118.   WheelBusMouse is a software driver early released by me, that
  119.   allows to use any wheel mouse without controller (but you must
  120.   alter the mouse).  My PS/2 controller is fully electrically
  121.   compatible with WBM package.  This means that you can install
  122.   WBM driver and use altered wheel mouse instead of soldering
  123.   PS/2 controller.  Or you even can connect second mouse and use
  124.   it as a scroller :-)
  125.  
  126. - you can simultaneously use mouse & 2 joysticks
  127.  
  128.   You can use joystick(s) in parallel with mouse: pressing «Fire»
  129.   of any joystick will disable mouse function on this port.
  130.  
  131.   If you press «Fire» on Joy1 (wheel function) - wheel will be
  132.   reseted to initial phase (don't touch wheel during game).
  133.  
  134.   If you press «Fire» on Joy2 (mouse port) - mouse will be disabled
  135.   at all.  For protect against probable mouse movement, mouse will
  136.   be enabled only after any mouse button pressing.
  137.  
  138. - no «calibration» requirements
  139.  
  140.   My controller doesn't use analog inputs and doesn't require
  141.   calibration (like Mroocheck interface from Elbox).
  142.  
  143. - wheel works in any screen mode
  144.  
  145.   Wheel works in any screen mode - you can simultaneously use
  146.   wheeled applications on PAL, DblPAL, Super72 or any other
  147.   screens (unlike Mroocheck with horizontal rate setting).
  148.  
  149. - horizontal scrolling even on one-wheel mouse
  150.  
  151.   You can switch vertical scrolling to horizontal by qualifier
  152.   pressing - like MMB in Mroocheck, but you can select any
  153.   qualifier key or joystick/mouse button.  For example - I use
  154.   left ALT.
  155.  
  156. - most advanced Amiga PS/2 mouse controller.
  157.  
  158.   Do you doubt in this yet? :) ;) =)
  159.  
  160.  
  161.   How to do it:
  162.  
  163. Download aminet:dev/cross/devpic.lha and use it for PIC16F84:
  164. picprog ps2m.hex force=16382 cw=16382
  165.  
  166. You can use any third party programmers - select options:
  167.  
  168. OSC = HS
  169. WDT = ON
  170.  
  171. After programming you can solder scheme from ps2m.png.
  172. RESISTOR AND CAPACITORS ARE RECOMMENDED, BUT NOT MANDATORY.
  173. You can solder scheme only with PIC and crystal resonator,
  174. and it will work.  If it is unstable or does not work at
  175. all, you can try capacitors with crystal, and then - capacitor
  176. and resistor near mouse.
  177.  
  178. I recommend you to use socket for PIC, if you don't have
  179. in-circuit programmer.  It will simplify firmware upgrades.
  180.  
  181. If scheme does not work - try another mouse.  It may be
  182. incompatibility with some mice.  If several different mice
  183. don't work - check connections: scheme is already tested and
  184. doesn't contain bugs.
  185.  
  186. If you had problems with PIC programming - try new devpic
  187. release 1.6 with v3 hardware, it is more stable than v2.
  188.  
  189. For wheel mice:
  190. connect 11-12-13 PIC pins with joystick port 6-3-1 pins.
  191.  
  192.  
  193.   Recommended mouse:
  194.  
  195. Genius NetScroll Optical (PS/2 version).
  196.  
  197.  
  198.   Installation:
  199.  
  200. Simply plug controller in mouse port :)
  201.  
  202. For wheel mice: insert WBM utility in your startup:
  203.  
  204. c:wbm
  205.  
  206. If you want to remove copyright message:
  207.  
  208. c:wbm quiet
  209.  
  210. If you want to reverse wheel action:
  211.  
  212. c:wbm reverse
  213.  
  214. If you want to reverse only horizontal scrolling:
  215.  
  216. c:wbm rx
  217.  
  218. If you want any Shift for horizontal scrolling:
  219.  
  220. c:wbm lshift rshift
  221.  
  222. Additional parameter - priority (0 by default):
  223.  
  224. c:wbm priority=10
  225.  
  226. Priority will be important in cases when you have continuous working
  227. program (for example, archiver) with priority higher than WBM.  WBM
  228. priority is recommended to be higher than priority of any continuous
  229. task.
  230.  
  231. Of course, you can mix options in any way.  See "wbm ?"
  232. and history for full list of options in current version.
  233.  
  234. Driver may be terminated by break signal on WheelBusMouse process.
  235.  
  236.  
  237. If you use optical mouse - connect 3 and 5 PIC pins together, and
  238. mouse will be always turned on (optical mice eats 80-100mA - it is
  239. far more than 25mA of PIC peak output current).
  240.  
  241.  
  242.   History:
  243.  
  244. 1.2
  245. - more compatible firmware, for example it supports Dexxa mice
  246. - more advanced WBM utility:
  247.   - added reverse of concrete wheel direction: RX and RY
  248.   - added qualifiers for scrolling direction change as
  249.     CLI options: LMB/S,MMB/S,RMB/S,JOYFIRE0=JF0/S,JOYFIRE1=JF1/S,
  250.                  JOYFIRE2=JF2/S,CTRL/S,LSHIFT=LSH/S,RSHIFT=RSH/S,
  251.                  LALT/S,RALT/S,LCOMMAND=LCMD/S,RCOMMAND=RCMD/S
  252. 1.1
  253. - more detailed manual
  254. - more advanced WBM utility:
  255.   - you don't need c:run for wbm startup anymore
  256.   - driver eats less CPU time (WaitTOF() instead of Delay())
  257.   - added CLI arguments: REVERSE/S,PRIORITY/N,QUIET/S
  258.  
  259. 1.0
  260. - first Aminet release
  261.  
  262.   Future:
  263.  
  264. - two wheels support (if I will succesfully hack protocol)
  265. - five buttons support (if I will succesfully hack protocol)
  266. - PIC16F627 will be needed for both functions
  267.   (but not needed, if you want only existing functions)
  268.  
  269.  
  270.  
  271.   License:
  272.  
  273.   All source code (including both mouse controller code and wheel
  274. driver) and all ideas of this controller are distributed under GPL
  275. (GNU General Public License).  About ideas: it means that all
  276. product contained my ideas must be released under GPL too :)
  277.  
  278.  
  279.   Thanks to:
  280.  
  281. 3BEPb (ldk@channel4.ru) for beta-testing.
  282.  
  283.  
  284.   Enjoy!
  285.  
  286.   rdc@mindless.com
  287.  
  288.